//
//  CategoryItem.swift
//  Landmarks
//
//  Created by 温哲 on 2021/2/13.
//

import SwiftUI

struct CategoryItem: View {
    var landmark: Landmark
    var body: some View {
        LazyVStack(alignment: .leading) {
            landmark.image.renderingMode(.original).resizable().frame(width: 155, height: 155).cornerRadius(5)
            Text(landmark.name).foregroundColor(.primary).font(.caption)
        }.padding(.leading, 15)
    }
}

struct CategoryItem_Previews: PreviewProvider {
    static var previews: some View {
        CategoryItem(landmark: ModelData().landmarks[0])
    }
}
